package io.gitee.baicaixiaozhan.httpmessagewrapper.kit;

import javax.servlet.http.HttpServletResponse;

/**
 * DESC:
 *
 * @author baicaixiaozhan
 * @since v1.0.0
 */
public class ServletResponseResultKit {

    private ServletResponseResultKit() {
    }

    private static final InheritableThreadLocal<HttpServletResponse> ITL = new InheritableThreadLocal<>();


    public static void setHttpServletResponse(HttpServletResponse response) {
        ITL.set(response);
    }

    public static HttpServletResponse getHttpServletResponse() {
        return ITL.get();
    }

    public static void clear() {
        ITL.remove();
    }

}
